#include <bits/stdc++.h>
using namespace std;

const int N = 1e5+10;
int n, cnt[N];
vector<int> v;

int main()
{
    freopen("duel.in", "r", stdin);
    freopen("duel.out", "w", stdout);
    ios::sync_with_stdio(0); cin.tie(0);
    cin >> n;
    for(int i = 1; i <= n; i++)
    {
        int t;
        cin >> t;
        if(!cnt[t]) v.push_back(t);
        ++cnt[t];
    }
    sort(v.begin(), v.end());
    int ans = n, lst = cnt[v[0]];
    for(int i = 1; i < v.size(); i++)
    {
        int num = cnt[v[i]];
        if(num >= lst)
        {
            ans -= lst;
            lst = 0;
        }
        else
        {
            ans -= num;
            lst -= num;
        }
        lst += num;
    }
    cout << ans << '\n';
    return 0;
}